package com.alfayun.fiscalriskanalysis.another.indicator;

import com.alfayun.fiscalriskanalysis.another.specification.indicator.SelectorSpec;

public final class Selectors {

	public static Selector bind(SelectorSpec spec) {
		switch (spec.type) {
		case SINGLE_SELECTOR:
			return new SingleSelector(spec);

		case ARRAY_SELECTOR:
			return new ArraySelector(spec);

		default:
			throw new IllegalArgumentException();
		}
	}

	private Selectors() {
		// Empty.
	}

}
